<!-- 2024-12-27 FQC检验-复核详情 按钮弹框 -->
<template>
  <el-drawer :title="title" :visible.sync="open" size="90%" append-to-body @close="cancel">
    <el-table v-loading="loading" :data="detailList" row-key="workorderId" default-expand-all
      height="calc(100vh - 310px)">
      <el-table-column label="节点名称" min-width="150" align="center" prop="nodeName" />
      <el-table-column label="节点状态" min-width="80" align="center" prop="nodeStatus">
        <template slot-scope="scope">
          {{ scope.row.nodeStatus == 1 ? '完成' : scope.row.nodeStatus }}
        </template>
      </el-table-column>
      <el-table-column label="开始节点" min-width="150" align="center" prop="beginNode" />
      <el-table-column label="目的节点" min-width="150" align="center" prop="endNode" />
      <el-table-column label="动作主题" min-width="250" align="center" prop="topic" />
      <el-table-column label="外理人" min-width="150" align="center" prop="transactor" />
      <el-table-column label="复核项" min-width="150" align="center" prop="approvalItems" />
      <el-table-column label="复核意见" min-width="150" align="center" prop="approveOpinion" />
      <el-table-column label="处理时间" min-width="100" align="center" prop="createTime" />
    </el-table>
  </el-drawer>
</template>

<script>
import { queryLineList } from "@/api/mes/qc/fqc";
export default {
  name: "reviewDetails",
  data() {
    return {
      title: "复核详情",
      open: false,
      rowInfo: {},
      stepIndex: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10000,
      },
      total: 0,
      loading: false,
      detailList: [],
    };
  },
  methods: {
    //初始化函数
    init(row) {
      this.rowInfo = row
      this.open = true;
      this.getDetails();
    },
    /** 查询生产工单列表 */
    getDetails() {
      this.loading = true;
      queryLineList({ backId: this.rowInfo.backId }).then((res) => {
        console.info(res)
        this.detailList = res.data
        this.total = res.total;
        this.loading = false;
      }).catch(() => {
        this.loading = false;
      });
    },

    /* 取消按钮 */
    cancel() {
      this.open = false;
      this.detailList = []
    },
  }
}
</script>
<style lang='scss' scoped>
.dialog-footer {
  padding-top: 20px;
  text-align: center;
}

.sn-title {
  background-color: #ddd;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.sn-title :deep(.el-checkbox .el-checkbox__label) {
  color: #fff !important;
}
</style>